home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3039 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.1 KB

  1. Path: colossus.holonet.net!russell
  2. From: russell@news.mdli.com (Russell Blackadar)
  3. Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
  4. Subject: Re: Hungarian notation
  5. Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
  6. Date: 21 Jan 1996 21:01:55 GMT
  7. Organization: HoloNet National Internet Access System: 510-704-1058/modem
  8. Message-ID: <4du9k3$l3j@colossus.holonet.net>
  9. References: <30C40F77.53B5@swsbbs.com> <4cvu68$2jb@macaw.cyberport.com> <4d21og$iab@news.xmission.com> <4d2ok0$69s@beach.and.nl> <4dtv3gINNo9u@keats.ugrad.cs.ubc.ca>
  10. NNTP-Posting-Host: jubal.mdli.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Sorry to continue this thread, but
  14. Kazimir Kylheku (c2a192@ugrad.cs.ubc.ca) wrote:
  15. [...]
  16. : If anyone wrote code with random consonants thrown in front of every perfectly
  17. : good name, I'd fire them on the spot...
  18.  
  19. A little harsh, no?  Not that I'm a big fan of HN, myself.
  20.  
  21. : >    typedef char* empnm_t;
  22. : >    typedef char* beernm_t;
  23.  
  24. : Even that is going overboard. Someone will later see "empnm_t", and wonder what
  25. : the heck it is...
  26.  
  27. Well, the answer to his question is, it's an empnm_t, at the level of
  28. abstraction of interest to the code it appears in.  Think OOP!  There 
  29. are times when this sort of thing is essential (for portability, e.g.
  30. see below) and other times when it just makes good OO sense.  If it's
  31. hard to find out what an empnm_t "really" is, maybe it *should* be hard.
  32. Not everywhere, to be sure, nor in every program.
  33.  
  34. : [...] Real compilers will detect structure equivalence between
  35. : types so that you don't have to obfuscate your code with confusing type names.
  36. : To implement domains, just lobotomize the compiler by removing the structure
  37. : equivalence checking so that size_t and time_t become incompatible types.
  38.  
  39. Huh?  Your example contradicts your point, if I understand you right.
  40. I fail to see how size_t could be said to be "compatible" with time_t,
  41. with or without lobotomy.  For starters, time_t is 8 bytes and size_t
  42. is 4, on one machine I use.
  43. --
  44. Russell Blackadar,   russell@mdli.com
  45.